package file.day9_16;

import java.io.File;

public class FileDemo {
    public static void main(String[] args) {
        File file = new File("./demo.txt");
        String name = file.getName();
        System.out.println("名字："+name);
        long length = file.length();//一个文字占三个字节
        System.out.println("长度："+length+"个字节");

        boolean cr = file.canRead();
        boolean cw = file.canWrite();
        System.out.println("可读："+cr);
        System.out.println("可写："+cw);

        boolean ih = file.isHidden();
        System.out.println("是否是隐藏的："+ih);
    }
}
